package com.heima.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@TableName("tb_node")
public class Node {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    @NotBlank(message = "点位名不能为空")
    private String name;
    @NotBlank(message = "点位地址不能为空")
    private String addr;
    @NotBlank(message = "区域id不能为空")
    private String areaCode;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long createUserId;
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "地区id不能为空")
    private Long regionId;
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "商圈id不能为空")
    private Long businessId;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long ownerId;
    private String ownerName;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;


}
